<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>课程分析管理</title>
	<link rel="stylesheet" href="/css/common2.css">
	<link rel="stylesheet" href="/css/popup.css">
	<link rel="stylesheet" href="/scriptZIP/vue-select.min.css">
	<style>
		/* .search_img {
			position: absolute;
			right: 3%;
		} */
		.filter-container {
			display: inline-block;
			flex-wrap: wrap;
			/* 允许换行 */
			gap: 10px;
			/* 输入框之间的间距 */
			max-width: 800px;
			/* 设置最大宽度，可以根据需要调整 */
		}

		.import_model {
			margin-top: -35px;
			margin-left: 130px;
		}

		.table {
			width: 100%;
			margin-left: 0;
		}

		.five {
			max-height: 55px !important;
			min-width: 130px !important;
			padding: 0;
		}

		.three {
			min-width: 100px;
			width: 9%;
		}

		.phone {
			color: blue;
		}

		.long-background-img {
			width: 120px;
			height: 35px;
			background: url("../image/enter_longer.png") no-repeat center center !important;
		}

		.nickname {
			position: absolute;
			left: 40px;
			bottom: calc((100% - 35px) / 2);
			width: 80px;
			text-align: left;
			display: inline-block;
			text-overflow: ellipsis;
			overflow: hidden;
			white-space: nowrap;
		}

		.untying {
			position: absolute;
			right: 0;
			bottom: 0;
			display: inline-block;
			font-size: 12px;
			cursor: pointer;
			color: #9F9F9F;
		}

		.img-box {
			width: 35px;
			height: 35px;
			display: inline-block;
			padding: 0;
		}

		.phone {
			display: inline-block;
		}

		.header {
			width: 35px;
			height: 35px;
			position: absolute;
			left: 3px;
			bottom: calc((100% - 35px) / 2);
			display: inline-block;
			border-radius: 50%;
		}

		.choose-class {
			width: 94%;
			height: 35px;
			margin-left: 3%;
			margin-top: 35px;
		}

		.popup {
			width: 330px;
			height: 300px;
			/* margin: calc((100% - 300px) / 6) calc((100% - 300px) / 2); */
		}

		.popup-title {
			padding-left: 100px;
		}

		.relatives-info {
			display: inline-block;
			text-overflow: ellipsis;
			overflow: hidden;
			white-space: nowrap;
			vertical-align: text-top;
			text-align: left;
		}

		.relatives-name {
			text-indent: 1em;
			width: calc(100% - 13em);
		}

		.relatives-relation {
			width: 5em;
		}

		.info2 {
			margin-top: 0.5em;
			vertical-align: text-top;
		}

		.relatives_info {
			width: 3.5em;
			display: inline-block;
			vertical-align: text-top;
		}

		.relatives_info img {
			height: 3.5em;
			width: 100%;
			border-radius: 50%;
			margin: 0 0.25em;
		}

		.uihf {
			display: flex;


		}
		.other {
			height: 33px;
			border: 1px solid #7a7a7a;
		}
		

		.search {
			position: relative;
			right: 0px;
			margin: 5px 10px 0 0;
		}
		.enroll-button {
		display: inline-block;
		padding: 10px 20px;
		background-color: #69bbf4; /* 绿色背景 */
		color: white; /* 字体颜色为白色 */
		font-weight: bold;
		text-align: center;
		text-decoration: none;
		border-radius: 5px; /* 圆角效果 */
		box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); /* 阴影效果 */
		transition: background-color 0.3s ease; /* 鼠标悬停时的平滑过渡 */
	}

	.enroll-button:hover {
		background-color: #c52626; /* 悬停时更深的绿色 */
	}
	</style>
</head>

<body>
	<div id="vue-root" style="margin-top: 30px;">

		<div class="filter-container">
			<div class="refresh" onclick="location.reload()">刷新</div>
			<div class="uihf">
				
				<select class="search" v-model="search.schoolId">
					<option :value="undefined">请选择校区</option>
					<option v-for="school in schools" :key="school.id" :value="school.id" v-text="school.name">
					</option>
				</select>
				
				<input placeholder="请输入学生姓名" class="search" v-model="search.name" @keyup.enter="getData0"
					style=" width: 120px; height: 33px;">

				<select class="search" v-model="search.courseId">
					<option :value="undefined">请选择课程</option>
					<option v-for="course in courses" :key="course.id" :value="course.id" v-text="course.name">
					</option>
				</select>

				<select class="search" v-model="search.studentStatus">
					<option :value="undefined">请选择状态</option>
					<option value="退费">退费</option>
					<option value="请假">请假</option>
					<option value="停课">停课</option>
					<option value="在读">在读</option>
					<option value="过期">过期</option>
					<option value="课程暂未开始">课程暂未开始</option>
				</select>
               
				<select class="search" v-model="search.orderType">
					<option :value="undefined">请选择类型</option>
					<option value="1">新签</option>
					<option value="2">续费</option>
					<option value="3">新签尾款</option>
				</select>
				
				<input placeholder="课程结束起" class="search" id="startTime" v-model="search.startTime" style="font-size: 15px; width: 130px;"/>
				<input placeholder="课程结束止" class="search" id="endTime" v-model="search.endTime" style="font-size: 15px;width: 130px;"/>
				
				<img src="../image/search.png"  height="35px" width="35" class="search_img" @click="getData0" />
			</div>
		</div>
		<form enctype="multipart/form-data" id="form" ref="form" style="display: none;">
			<input type="file" name="file" id="file" @change="importExcel" ref="file"
				accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel">
		</form>
		<div class="table " style="margin-left: 2%;width: 96%; overflow: auto;">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">
						</th>
						<th class="one">序号</th>
						
						<th class="three">校区</th>
						<th class="one">学员姓名</th>
		   				<th class="one">报读课程</th>
						   <th class="one">状态</th>
						   <th class="one">类型</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(student,index) in list" :key="student.id">
						<td>
							<input type="checkbox" class="check-box" v-model="student.checked">
						</td>
						<td class="one"><span v-text="index+1"></span></td>
						<td class="one" v-text="student.schoolNamea"></td>
						<td class="one" v-text="student.name"></td>
						<td class="one" v-text="student.courseNames"></td>
						<td class="one" v-text="student.courseStatuses"></td>

                      <td class="one" v-text="getorderTypes(student.orderTypes)"></td>
						
					
					</tr>
					<tr></tr>
				</tbody>
			</table>
		</div>
		<br>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
			<li>
				<a v-text="pages"></a>
			</li>
		</ul>
		<div style="float: right;">
			总共{{total}}条记录
			<select class="ui-select init" style="height:32px" v-model="pageSize">
				<option :value="10">每页10条</option>
				<option :value="30">每页30条</option>
				<option :value="100">每页100条</option>
			</select>
		</div>
		<!--遮罩层-->
		
	</div>
	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/scriptZIP/vue-select.min.js"></script>

	<script src="/scriptZIP/vue-select.min.js"></script>


	<script src="/lib/laydate/laydate.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>
	<script src="/js/auth_util.js"></script>


	<script>

		Vue.component('v-select', VueSelect.VueSelect);
		var app = new Vue(merge({
			data: {
				schools: [],
				promoters:[],
				peoples:[],
				courses:[],
				dataSource: null,
				dataStatus: null,
				dataIntent: null,
				selectedDataSourceIndex: null, // 添加这里
				selectedDataStatusIndex: null,   // 添加这里
				selectedDataIntentIndex: null,    // 添加这里
				urls: {
					del: '/pc/student/del'
				},
				popup: false,
				toClassesId: null,
				boundShow: false,
				shownStudent: null
			},
			created: function () {
				var id = top_params().id;
				if (!id) return;
				this.agentId = id
				this.urls.list = '/pc/student/listXy/' + this.agentId;
				this.getData();

				axios.get('/pc/school/all/' + id).then(function (res) {
					this.schools = res.data;
				}.bind(this));
				abled('studentData', this);
				
				axios.get('/pc/course/all/' + this.agentId).then(function (res) {
					this.courses=res.data
				}.bind(this));

			},
			methods:{
				getorderTypes(str){
					if(!str)return '';
					var arr=''
					let arr2 = str.split(",");
					let arr3=['新签','续费','新签尾款']
					for (let i = 0; i < arr2.length; i++) {
						arr=arr+arr3[(Number(arr2[i])-1)]+','
					}
					arr=arr.slice(0, -1)
					return arr;
				}
			},

		}));
		["startTime", "endTime"].forEach(function (it) {
			laydate.render({
				elem: "#" + it,
				type: "datetime",
				done: function (value, date, endDate) {
					app.search[it] = value;
				},
			});
		});
	</script>

</body>

</html>